export default {
    state: () => ({
        account: {},
        userInfo: {}
    }),

    mutations: {
        SET_ACCOUNT(state, account = {}) {
            state.account = account
            uni.setStorageSync('account', account)
        },
        SET_USER_INFO(state, userInfo = {}) {
            if(process.env.NODE_ENV === 'development') {
                userInfo.vip = '01'
            }
            state.userInfo = userInfo
            uni.setStorageSync('userInfo', userInfo)
        }
    }
}
